-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mypy test #7478
Fix mypy test #7478
Conversation
Because we didn't set mypy's clean_exit parameter, it was exiting immediately after checking the stdlib. This exposed two issues: - types-requests has a version-limited dependency on types-urllib3, which we crashed on - mypy crashes checking the SQLAlchemy stubs. Not sure if that's a known issue.
SQLAlchemy stack trace:
|
They use http.client, which is Python 3-only. Another catch from #7478.
They use http.client, which is Python 3-only. Another catch from #7478.
It has to be imported from `typing` in <3.7. Refs #7478.
#7482 for the |
It has to be imported from `typing` in <3.7. Refs #7478.
The |
See #7478 (comment): `types-requests` imports `types-urllib3`, and `types-urllib3` is incompatible with Python 2.
#7483 to do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, once the problems are resolved.
* Run mypy on the 3.11 stdlib in CI, as a regression test for python/mypy#12220 * Correct the docstring at the top of the file following the changes made in #7478 * Stop the test from crashing when run locally if there's an extra file/folder in the stubs directory.
Because we didn't set mypy's clean_exit parameter, it was
exiting immediately after checking the stdlib.
This exposed two issues: